package java19_4_19.com.thread.about_attributes;

import java.util.Scanner;

public class maxi {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
            String str = sc.nextLine();
            int i = 0;
            int len = str.length();
            int max = 0;
            int left = 0;
            String ret = " ";
            while(i < len) {
                while(i < len && str.charAt(i) < '0' || str.charAt(i) > '9') {
                    i++;
                }
                left = i;
                while(i < len && str.charAt(i) >= '0' && str.charAt(i) <= '9') {
                    i++;
                }
                if(max < (i - left)) {
                    max = i - left;
                    ret = str.substring(left,i);
                }
            }
            System.out.println(ret);

    }
}
class base {
    public  base(String s) {
        System.out.println("B");
    }
}